import Vue from 'vue';
import Router from 'vue-router';
import showRouter from './show';
import adminRouter from './admin';
Vue.use(Router);

export default new Router({
  routes: [].concat(showRouter, adminRouter),
  scrollBehavior (to, from, savedPosition) {
    if (savedPosition) {
      return savedPosition;
    } else {
      document.scrollingElement.scrollTop = 0;
    }
  }
});


